package edu.cuit.avatar.decorator;

/**
 * 装饰模式
 * 1.比继承更加灵活,用户灵活的选择
 * 2.符合开闭原则
 * 3.可以多次装
 * @author <a href="mailto:1020zhaodan@163.com">Adan</a>
 * @version 1.0
 * @date 2025/7/12 14:37
 */
public class MessageBoardTest {
    public static void main(String[] args) {
        //MessageBoard board = new BasicMessageBoard();
        //MessageBoard board = new FilterMessageBoard(new BasicMessageBoard());
        MessageBoard board = new DecorateMessageBoard(new FilterMessageBoard(new BasicMessageBoard()));
        String message = board.message();
        System.out.println("你的留言内容:");
        System.out.println(message);
    }
}
